Skip to content

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jan 6, 2023

We used to immediately recurse into the dependencies of a Step, and add a new Node for them to the current Graph if they didn't exist yet.

This was originally written like this to support inputs for the ShellSteps, which would automatically add in any necessary Nodes into the same Graph as necessary without explicitly adding them.

However, it would also have the effect that Steps which would have been added to the Graph would be parented incorrectly (they would be eagerly added to the wrong parent).

Do this in two stages now: first try to resolve all step dependencies between things that are added to the graph, then create new Nodes for missing Step dependencies later.

Fixes #21843.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

We used to immediately recurse into the dependencies of a Step,
and add a new Node for them to the current Graph if they didn't
exist yet.

This was originally written like this to support `inputs` for the
`ShellSteps`, which would automatically add in any necessary Nodes
into the same Graph as necessary without explicitly adding them.

However, it would also have the effect that Steps which **would have**
been added to the Graph would be parented incorrectly (they would
be eagerly added to the wrong parent).

Do this in two stages now: first try to resolve all step dependencies
between things that are added to the graph, then create new Nodes
for missing Step dependencies later.

Fixes #21843.
@rix0rrr rix0rrr requested a review from a team January 6, 2023 15:31
@rix0rrr rix0rrr self-assigned this Jan 6, 2023
@gitpod-io
Copy link

gitpod-io bot commented Jan 6, 2023

@aws-cdk-automation aws-cdk-automation requested a review from a team January 6, 2023 15:31
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 labels Jan 6, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 6, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

@rix0rrr rix0rrr added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Jan 6, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review January 6, 2023 15:38

✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.

public first() {
const nodes = new Set(this.nodes);
const sorted = this.nodes[0].rootGraph.sortedLeaves();
for (const tranche of sorted) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[tangent][non-blocking] An unexpected word: tranche: portion.

@mergify
Copy link
Contributor

mergify bot commented Jan 17, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: e6a336d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 0d8142b into main Jan 17, 2023
@mergify mergify bot deleted the huijbers/pipelines-cross-stack-dep-names branch January 17, 2023 15:19
@mergify
Copy link
Contributor

mergify bot commented Jan 17, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/medium Medium work item – several days of effort p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pipelines: Wrong action name when adding dependency between steps

3 participants